<?php
  /**
   * Created by PhpStorm.
   * User: sirius
   * Date: 2019/5/20
   * Time: 21:38
   */

  namespace app\api\controller;


  use app\admin\model\echartsapp\AreaInfo;
  use app\admin\model\echartsapp\AreaMap;
  use app\common\controller\Api;

  class EchartsMap extends Api {

    protected $noNeedLogin=['map', 'mapInfo', 'map_info'];
    protected $noNeedRight=['map', 'mapInfo', 'map_info'];

    function map(AreaMap $areaMapModel){
  $adcode = $this->request->param('adcode');

  $data = $areaMapModel->where( 'adcode', $adcode)->find();

$this->success('请求成功', $data);
}

    public function mapInfo ( AreaInfo $areaInfoModel ) {
      $adcode = $this->request->param('adcode');

      $data = $areaInfoModel->where( 'area_map_code', $adcode)->find();

      $this->success('请求成功', $data);
    }
  }
